<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<title><?=$title?></title>	
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <meta  http-equiv="description" content="Free open source blog software based on codeigniter." />
    <meta http-equiv="keywords" content="Free,open,source,blog,website,codeigniter,web design,speedovation,hosting" />
    <meta http-equiv="author" content="Yash Bharadwaj" />
	<link rel="stylesheet" href="<?=base_url()?>themes/default/css/main.css" type="text/css" media="screen, projection" />
	<link rel="stylesheet" href="<?=base_url()?>themes/default/css/default.css" type="text/css" media="screen, projection" />
</head>

<body id="home">
	<div class="wrap">
		<div id="logo">
        <?php
		$site_name=$this->config->item('site_name');
		$site_slogan=$this->config->item('site_slogan');
		$sub_site_slogan=$this->config->item('sub_site_slogan');
		 ?>
			<h1><?=anchor('blog/',$site_name,'Home')?> - <?=$site_slogan?></h1>
		  <p><?=$sub_site_slogan?></p>
	  </div>
		<?=$pages?>
	</div>
	<div class="wrap">
		<div id="left">
				<?=$allposts?>
              	
         </div>	
		<div id="right">
			<?php 
			//known bug two form can't work together working to remove this.
			 if($this->uri->segment(1)=="users") {echo ""; } else { ?>
            <h2>Search</h2>
			<?=$this->load->view('searchform');?>
            <p>&nbsp;</p>
            <?php } ?>
            <h2>Latest Entries</h2>
			<?=$RecentPosts?>
            <p>&nbsp;</p>
            <h2>Latest Comments</h2>
			<?=$RecentComments?>
            <p>&nbsp;</p>
			<h2>Categories</h2>
            <?=$Categories?>
            <p>&nbsp;</p>
            <h2>Archives</h2>
            <?=$Archives?>
            <p>&nbsp;</p>
             <h2>Users</h2>
           <?php
		   	if($this->session->userdata('logged_in'))
			{?>
			<ul>
            	<li>Welcome <?=$this->session->userdata('first_name')?>&nbsp;<?=$this->session->userdata('last_name')?></li>
                <li><?=anchor('users/ViewProfile/'.$this->session->userdata('user_id'),'View Profile')?></li>
                <li><?=anchor('users/Logout','Logout')?></li>
            </ul> 
		   <?php } else {?>
			<ul>
            	<li><?=anchor('users/Register','Register')?></li>
                <li><?=anchor('users/Login','Login')?></li>
                <li><?=anchor('users/ForgetPassword','Forget Password')?></li>
            </ul>
            <?php }?>
            <p>&nbsp;</p>
            <div id="tagcloud">
			<h2>TagClouds</h2>
            <?=$TagClouds?>
            <p>&nbsp;</p>
			</div>
			
		</div>
		<div id="footer">
			<p>Blogmer created By : Yash</p>
	  </div>		
	</div>
</body>
</html>
